﻿/***************************************************************
 * Name:      HouseholdManagementApp.h
 * Purpose:   Defines Application Class
 * Author:    JHC (wqvbjhc@gmail.com)
 * Created:   2012-08-30
 * Copyright: JHC (http://my.csdn.net/wqvbjhc)
 * License:
 **************************************************************/

#ifndef HOUSEHOLDMANAGEMENTAPP_H
#define HOUSEHOLDMANAGEMENTAPP_H

#include <wx/app.h>
#define CONFIGNAME _T("householdDBconf") //默认配置文件名称
typedef struct __Configure__{
    wxString dbFilePath;//数据库的路径
    wxString bgPicPath;//背景图片路径
    wxString needlogin;//是否需要登录框，测试用
}Configure;

extern Configure app_conf_;

class HouseholdManagementApp : public wxApp
{
public:
    virtual bool OnInit();
    virtual int OnExit();
};

wxString GetWorkDirectory();//得到程序的当前目录
///配置信息(位置程序的当前目录下)的读写操作
void CreateDefConfFile();
bool ReadConfFile(Configure& conf);
bool WriteConfFile(const Configure& conf);
#endif // HOUSEHOLDMANAGEMENTAPP_H
